import request from '@/utils/request'

// 查询流程定义列表
export function listProcessDefinition(query) {
  return request({
    url: '/flowable/processDefinition/list',
    method: 'get',
    params: query
  })
}

// 查询流程定义详细
export function getProcessDefinition(id) {
  return request({
    url: '/flowable/processDefinition/' + id,
    method: 'get'
  })
}

// 新增流程定义
export function addProcessDefinition(data) {
  return request({
    url: '/flowable/processDefinition',
    method: 'post',
    data: data
  })
}

// 修改流程定义
export function updateProcessDefinition(data) {
  return request({
    url: '/flowable/processDefinition',
    method: 'put',
    data: data
  })
}

// 删除流程定义
export function delProcessDefinition(id) {
  return request({
    url: '/flowable/processDefinition/remove',
    method: 'get',
    params:{id:id}
  })
}
